package com.heatingcharge.controller.sys;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.heatingcharge.common.util.R;
import com.heatingcharge.entity.sys.SysDict;
import com.heatingcharge.service.sys.ISysDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 字典表 前端控制器
 * </p>
 *
 * @author devin.jiang
 * @since 2020-01-21
 */
@RestController
@RequestMapping("/sys-dict")
public class SysDictController {

    @Autowired
    ISysDictService dictService;

    @GetMapping
    public R getSysDict(SysDict sysDict){
        QueryWrapper<SysDict> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("dict_code",sysDict.getDictCode());
        List<SysDict> list = dictService.list(queryWrapper);
        return R.ok(list);
    }
}

